if (do_name() != 'Home') : ?>
include("util/comment.php"); ?>
Reference | BezierPath
endif ?>Syntax | BezierPath() |
Description | Each path in NodeBox (see for example, rect(), oval(), endpath(), textpath()) is a BezierPath object. This object has a number of properties to manipulate indivdual points in the path and can be passed to the drawpath() command to draw it on the canvas. |
Properties | path.bounds path.length path.contours |
Methods | path[i] path.moveto(x, y) path.lineto(x, y) path.curveto(h1x, h1y, h2x, h2y, x, y) path.closepath() path.rect(x, y, width, height) path.oval(x, y, width, height) path.contains(x, y) path.point(t) path.points(amount=100) path.addpoint(t) path.segmentlengths(relative=False, n=10) path.intersects(path) path.intersect(path, flatness=0.6) path.union(path, flatness=0.6) path.difference(path, flatness=0.6) path.fit(x=None, y=None, width=None, height=None, stretch=False) path.copy() See the tutorial on paths to learn about all the methods. With the segmentlengths() method you can define the math precision for point() and points() by making n a higher value (usually 10 is fine). When you loop over a path it returns a list of PathElement objects. |